package com.zj.service.aop;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

@Component //将切面类声明为一个bean
@Aspect //声明这是一个切面类
public class AspectWithIn {

    //    @Before(value = "within(com.zj.service.User)")//对User类进行增强
    @Before(value = "@within(com.zj.service.aop.MyDes)")//对标记了@Mydes的类增强
    public void Before(){
        System.out.println("AspectWithIn before");
    }
}
